public class PlayerAIState_Defense_FreeThrow : State<PlayerAI>
{
	public static PlayerAIState_Defense_FreeThrow instance;

	private PlayerAIState_Defense_FreeThrow()
	{
	}

	public static PlayerAIState_Defense_FreeThrow getInstance()
	{
		if (instance == null)
		{
			instance = new PlayerAIState_Defense_FreeThrow();
		}
		return instance;
	}

	public override void enter(PlayerAI owner)
	{
		base.enter(owner);
		owner.time_Stop = 0f;
		owner.freethrow_isHandAnimation = MathHelper.isInPercent(50f);
	}

	public override void fixedUpdate(PlayerAI owner)
	{
		base.fixedUpdate(owner);
		if (GameHelper.MoveTo(owner.player, owner.freethrow_pos, owner.player.getMoveSpeed(), isLookAtTargetPos: true))
		{
			if (owner.player.isInState(PlayerStateBehavior_Run.getInstance()))
			{
				Instance<Court>.instance.count_ReadyToFreeThrow++;
			}
			owner.player.do_idle();
			owner.player.LookAt(owner.freethrow_direction);
			if (owner.freethrow_isHandAnimation)
			{
				owner.player.playAnimation(AnimationName.player_idle_freethrow, 1f, 0.8f);
			}
		}
		else
		{
			owner.player.do_run();
		}
	}
}
